
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>概要 · vue_basic_template</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="Gj">
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-prism/prism-tomorrow.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="styles/website.css">
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="src/api.html" />
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter active" data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    概要
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">src目录</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="src/api.html">
            
                <a href="src/api.html">
            
                    
                    api
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="src/assets.html">
            
                <a href="src/assets.html">
            
                    
                    assets
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="src/components.html">
            
                <a href="src/components.html">
            
                    
                    components
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="src/filters.html">
            
                <a href="src/filters.html">
            
                    
                    filters
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="src/icons.html">
            
                <a href="src/icons.html">
            
                    
                    icons
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="src/layout.html">
            
                <a href="src/layout.html">
            
                    
                    layout
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="src/router.html">
            
                <a href="src/router.html">
            
                    
                    router
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="src/store.html">
            
                <a href="src/store.html">
            
                    
                    store
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9" data-path="src/styles.html">
            
                <a href="src/styles.html">
            
                    
                    styles
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="src/utils.html">
            
                <a href="src/utils.html">
            
                    
                    utils
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.11" data-path="src/views.html">
            
                <a href="src/views.html">
            
                    
                    views
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.12" data-path="src/config.html">
            
                <a href="src/config.html">
            
                    
                    config
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >概要</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x6982;&#x8981;">&#x6982;&#x8981;</h1>
<h5 id="&#x5206;&#x652F;">&#x5206;&#x652F;</h5>
<ul>
<li>master &#x57FA;&#x7840;&#x6A21;&#x677F;</li>
<li>dev &#x53C2;&#x7167;<strong>&#x9A71;&#x52A8;&#x7BA1;&#x7406;</strong>&#xFF0C;&#x6DFB;&#x52A0;&#x4E00;&#x4E9B;&#x57FA;&#x672C;&#x529F;&#x80FD;&#x3002;</li>
</ul>
<h5 id="&#x6280;&#x672F;&#x9009;&#x578B;">&#x6280;&#x672F;&#x9009;&#x578B;</h5>
<blockquote>
<p>vue-cli@4&#x3001;webpack@4&#x3001;element-ui@2.13.0&#x3001;eslint@6.7.2&#x3001;scss</p>
</blockquote>
<ul>
<li><strong><a href="https://cli.vuejs.org/zh/guide/" target="_blank">vue-cli</a></strong> &#x3010;&#x4E86;&#x89E3;&#x3011;<ul>
<li>Vue CLI &#x662F;&#x4E00;&#x4E2A;&#x57FA;&#x4E8E; Vue.js &#x8FDB;&#x884C;&#x5FEB;&#x901F;&#x5F00;&#x53D1;&#x7684;&#x5B8C;&#x6574;&#x7CFB;&#x7EDF;&#x3002;</li>
<li>&#x9009;&#x62E9;4&#x7684;&#x7248;&#x672C;&#xFF0C;&#x6027;&#x80FD;&#x4F1A;&#x6BD4; <strong>&#x5408;&#x540C;&#x7BA1;&#x7406;</strong> &#x4F18;&#x5316;&#x8981;&#x597D;&#x4E00;&#x4E9B;&#x3002;</li>
<li><strong>&#x76EE;&#x5F55;&#x7ED3;&#x6784;</strong> &#x6E05;&#x6670;&#x3002;</li>
</ul>
</li>
<li><strong><a href="https://www.webpackjs.com/" target="_blank">webpack</a></strong> &#x3010;&#x4E86;&#x89E3;&#x3011;<ul>
<li>4&#x7248;&#x672C;&#xFF0C;&#x5B98;&#x65B9;&#x5BA3;&#x4F20;&#x80FD;&#x591F;&#x63D0;&#x5347;&#x6784;&#x5EFA;&#x901F;&#x5EA6;60%-98%</li>
</ul>
</li>
<li><strong><a href="https://element.eleme.cn/#/zh-CN" target="_blank">element-ui</a></strong>&#x3010;&#x5F00;&#x53D1;&#x9700;&#x8981;&#x770B;&#x6587;&#x6863;&#x3011;</li>
<li><strong><a href="https://eslint.bootcss.com/" target="_blank">eslint</a></strong>  &#x3010;&#x4E86;&#x89E3;&#x3011;<ul>
<li>&#x5F15;&#x5165;&#x4E86;vue&#x5B98;&#x65B9;&#x7684;&#x9ED8;&#x8BA4;&#x914D;&#x7F6E;</li>
</ul>
</li>
<li><strong><a href="https://www.sass.hk/" target="_blank">scss</a></strong> &#x3010;&#x4E86;&#x89E3;&#x3011; </li>
</ul>
<h5 id="&#x811A;&#x624B;&#x67B6;&#x521B;&#x5EFA;vue&#x9879;&#x76EE;">&#x811A;&#x624B;&#x67B6;&#x521B;&#x5EFA;vue&#x9879;&#x76EE;</h5>
<blockquote>
<p>&#x5168;&#x5C40;&#x5B89;&#x88C5;vue&#x811A;&#x624B;&#x67B6;</p>
</blockquote>
<pre class="language-"><code class="lang-shell">npm install -g @vue-cli
</code></pre>
<blockquote>
<p>&#x521B;&#x5EFA;vue&#x9879;&#x76EE;</p>
</blockquote>
<pre class="language-"><code class="lang-shell">vue create rits-vue-basic-template
</code></pre>
<p><img src="images/vue_create.jpg" alt=""></p>
<h5 id="&#x9879;&#x76EE;&#x76EE;&#x5F55;&#x7ED3;&#x6784;">&#x9879;&#x76EE;&#x76EE;&#x5F55;&#x7ED3;&#x6784;</h5>
<pre class="language-"><code class="lang-bash"><span class="token builtin class-name">.</span>
&#x251C;&#x2500;&#x2500; babel.config.js                <span class="token comment">#babel&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#xFF0C;js&#x4EE3;&#x7801;&#x5411;&#x4E0B;&#x517C;&#x5BB9;</span>
&#x251C;&#x2500;&#x2500; dev.config.js                <span class="token comment">#Vue&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#xFF0C;&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x7684; **ip&#xFF0C;&#x7AEF;&#x53E3;&#x53F7;&#xFF0C;&#x4EE3;&#x7406;** &#x7B49;</span>
&#x251C;&#x2500;&#x2500; dist                        <span class="token comment">#yarn build &#x6253;&#x5305;&#x7684;&#x9759;&#x6001;&#x8D44;&#x6E90;</span>
&#x251C;&#x2500;&#x2500; package.json                <span class="token comment">#&#x9879;&#x76EE;&#x8BF4;&#x660E;&#x6587;&#x4EF6;</span>
&#x251C;&#x2500;&#x2500; public                      <span class="token comment">#&#x4E3B;&#x9875;&#xFF0C;&#x9879;&#x76EE;&#x5165;&#x53E3;</span>
&#x2502;   &#x251C;&#x2500;&#x2500; favicon.ico
&#x2502;   &#x2514;&#x2500;&#x2500; index.html
&#x251C;&#x2500;&#x2500; README.md                   <span class="token comment">#&#x9605;&#x8BFB;&#x6307;&#x5357;</span>
&#x251C;&#x2500;&#x2500; src                         
&#x2502;   &#x251C;&#x2500;&#x2500; App.vue                 <span class="token comment">#&#x6839;&#x7EC4;&#x4EF6;</span>
&#x2502;   &#x251C;&#x2500;&#x2500; main.js                 <span class="token comment">#&#x5165;&#x53E3;&#x6587;&#x4EF6;</span>
&#x2502;   &#x251C;&#x2500;&#x2500; api                     <span class="token comment">#&#x63A5;&#x53E3;&#x6587;&#x4EF6;</span>
&#x2502;   &#x251C;&#x2500;&#x2500; assets                  <span class="token comment">#&#x8D44;&#x6E90;&#x6587;&#x4EF6; &#x56FE;&#x7247;&#x7B49;</span>
&#x2502;   &#x251C;&#x2500;&#x2500; components              <span class="token comment">#&#x516C;&#x5171;&#x7EC4;&#x4EF6;&#x5E93;</span>
&#x2502;   &#x251C;&#x2500;&#x2500; filters                 <span class="token comment">#&#x8FC7;&#x6EE4;&#x5668;</span>
&#x2502;   &#x251C;&#x2500;&#x2500; icons                   <span class="token comment">#svg&#x6587;&#x4EF6;</span>
&#x2502;   &#x251C;&#x2500;&#x2500; layout                  <span class="token comment">#&#x5E03;&#x5C40;&#x7EC4;&#x4EF6;</span>
&#x2502;   &#x251C;&#x2500;&#x2500; mixins                  <span class="token comment">#&#x591A;&#x7EE7;&#x627F;</span>
&#x2502;   &#x251C;&#x2500;&#x2500; router                  <span class="token comment">#&#x8DEF;&#x7531;</span>
&#x2502;   &#x251C;&#x2500;&#x2500; store                   <span class="token comment">#Vuex</span>
&#x2502;   &#x251C;&#x2500;&#x2500; styles                  <span class="token comment">#&#x5168;&#x5C40;&#x5171;&#x6709;&#x6837;&#x5F0F;&#x5E93;</span>
&#x2502;   &#x251C;&#x2500;&#x2500; utils                   <span class="token comment">#&#x5DE5;&#x5177;&#x5305;</span>
&#x2502;   &#x2514;&#x2500;&#x2500; views                   <span class="token comment">#&#x7EC4;&#x4EF6;&#x5305;&#x3001;&#x89C6;&#x56FE;</span>
&#x251C;&#x2500;&#x2500; vue.config.js               <span class="token comment">#Vue&#x914D;&#x7F6E;&#x6587;&#x4EF6;</span>
&#x251C;&#x2500;&#x2500; jsconfig.json               <span class="token comment">#vscode&#x7F16;&#x8F91;&#x5668;&#x4E0B;js&#x7684;&#x663E;&#x793A;&#x5F15;&#x7528;&#x6587;&#x4EF6;</span>
&#x2514;&#x2500;&#x2500; yarn.lock
</code></pre>
<h5 id="&#x542F;&#x52A8;">&#x542F;&#x52A8;</h5>
<blockquote>
<p>cd&#x5230;&#x9879;&#x76EE;&#x6839;&#x76EE;&#x5F55;&#x4E0B;</p>
</blockquote>
<p><code>yarn serve</code>  &#x6216;&#x8005; <code>npm run serve</code></p>
<h5 id="&#x6253;&#x5305;">&#x6253;&#x5305;</h5>
<blockquote>
<p>&#x5728;&#x6839;&#x76EE;&#x5F55;&#x4E0B;&#x9762;&#x4F1A;&#x751F;&#x6210; <strong>dist</strong> &#x6587;&#x4EF6;&#x5939;&#xFF0C;&#x628A;&#x91CC;&#x9762;&#x7684;&#x6240;&#x6709;&#x6587;&#x4EF6;&#x90FD;&#x653E;&#x5230; <strong>&#x670D;&#x52A1;&#x7AEF;</strong> &#x7684;&#x9759;&#x6001;&#x8D44;&#x6E90;&#x8BBF;&#x95EE;&#x8DEF;&#x5F84;&#x4E0B;&#x3002;</p>
</blockquote>
<p><code>yarn build</code> &#x6216;&#x8005; <code>npm run build</code></p>
<h5 id="&#x538B;&#x7F29;svg">&#x538B;&#x7F29;svg</h5>
<blockquote>
<p>&#x5728;package.json&#x91CC;&#x9762;&#xFF0C;&#x914D;&#x7F6E;&#x4E86;&#x538B;&#x7F29;svg&#x7684;&#x547D;&#x4EE4;&#x3002;</p>
</blockquote>
<p><code>yarn svgo</code></p>
<h5 id="&#x7F13;&#x5B58;&#x5904;&#x7406;">&#x7F13;&#x5B58;&#x5904;&#x7406;</h5>
<blockquote>
<p>&#x5F53;&#x65B0;&#x5EFA;&#x9875;&#x9762;&#x6216;&#x8005;&#x6DFB;&#x52A0;&#x6587;&#x4EF6;&#x7684;&#x65F6;&#x5019;&#x3002;&#x6709;&#x65F6;&#x4F1A;&#x9047;&#x5230;&#x4E00;&#x4E9B; <em>undefined</em> &#x6216;&#x8005;&#x6587;&#x4EF6;&#x4E0D;&#x5B58;&#x5728;&#x7684;&#x95EE;&#x9898;&#x3002;</p>
<p>&#x8FD9;&#x7C7B;&#x60C5;&#x51B5;&#x4E0B;&#x53EF;&#x901A;&#x8FC7;&#x4E0B;&#x9762;&#x4E09;&#x79CD;&#x65B9;&#x5F0F;&#x3002;</p>
</blockquote>
<ul>
<li>webpack&#x901A;&#x8FC7;<code>cache-loader</code> &#x4F1A;&#x9ED8;&#x8BA4;&#x4E3A; Vue/Babel/TypeScript &#x7F16;&#x8BD1;&#x5F00;&#x542F;&#x3002;&#x6587;&#x4EF6;&#x4F1A;&#x7F13;&#x5B58;&#x5728; <code>node_modules/.cache</code> &#x4E2D;&#x3002;&#x901A;&#x8FC7;&#x547D;&#x4EE4; <code>rm -rf node_modules/.cache</code> &#x6216;&#x8005;&#x624B;&#x52A8;&#x5728;<code>node_modules</code>&#x4E0B;&#x627E;&#x5230;<code>.cache</code>&#x6587;&#x4EF6;&#xFF0C;&#x5220;&#x9664;&#x6389;&#x3002;</li>
<li>&#x901A;&#x8FC7;&#x5FEB;&#x6377;&#x952E;<code>ctrl</code> + <code>shift</code> + <code>delete</code> &#x6E05;&#x7406;&#x6D4F;&#x89C8;&#x5668;&#x7F13;&#x5B58;&#x3002;</li>
<li>&#x901A;&#x8FC7;&#x5FEB;&#x6377;&#x952E; <code>ctrl</code> + <code>f5</code> &#x5F3A;&#x5236;&#x5237;&#x65B0;&#x6D4F;&#x89C8;&#x5668;&#x3002;</li>
</ul>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                
                <a href="src/api.html" class="navigation navigation-next navigation-unique" aria-label="Next page: api">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"概要","level":"1.1","depth":1,"next":{"title":"api","level":"2.1","depth":1,"path":"src/api.md","ref":"src/api.md","articles":[]},"dir":"ltr"},"config":{"plugins":["chapter-fold","-lunr","-search","search-pro","-highlight","prism"],"styles":{"website":"styles/website.css"},"pluginsConfig":{"prism":{"css":["prismjs/themes/prism-tomorrow.css"]},"chapter-fold":{},"search-pro":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"Gj","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"vue_basic_template","language":"zh-hans","gitbook":"3.2.3","description":"vue基于element-ui，参照《合同》整理出的一套基础模板"},"file":{"path":"README.md","mtime":"2020-03-09T05:40:48.630Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-03-09T08:07:20.191Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

